package bancosys.tec.services.test.services;

import jmine.tec.di.annotation.Injected;
import jmine.tec.services.annotations.ServiceFields;
import jmine.tec.services.api.ActionsEnum;
import jmine.tec.services.api.ServiceProperties;
import bancosys.tec.persist.PersistenceController;
import bancosys.tec.persist.dao.BaseDAOFactory;
import bancosys.tec.services.api.AbstractService;

@ServiceFields(action = ActionsEnum.ALTERAR, required = {})
public class AlterarTestService extends AbstractService<PersistenceController> {

    private BaseDAOFactory fac;

    private ServiceProperties props;

    public AlterarTestService() {
        super();
    }

    public AlterarTestService(ServiceProperties serviceProperties) {
        super(serviceProperties);
    }

    @Injected
    public void setServiceProps(ServiceProperties props) {
        this.props = props;
    }

    /**
     * @param fac {@link BaseDAOFactory}
     */
    @Injected
    public void setDaoFactory(BaseDAOFactory fac) {
        this.fac = fac;
    }

    public void execute() {
        this.fac.toString();
        this.props.toString();
        System.out.println("Execute: " + this.getClass().getName());
    }
}